<!DOCTYPE html>
<html>
<head>
	<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
	<title></title>
	<link rel="stylesheet" type="text/css" href="css/MultiPicker.css">
</head>
<body>
	<input type="text" name="book" id="channel">
	<div id="date2"></div>
	<script type="text/javascript" src="js/jquery-2.1.4.min.js"></script>
	<script type="text/javascript" src="js/MultiPicker.js"></script>
	<script type="text/javascript" src="js/json.js"></script>
	<script type="text/javascript">
        //书名选择器
        new MultiPicker({
            input: 'channel', //点击触发插件的input框的id
            container: 'date2', //插件插入的容器id
            jsonData: $data,
            success: function(arr) {
                    var val = JSON.stringify(arr); //JSON格式的字符串
                    var arr2 = [];
                    $.each(arr, function(index, el) {
                        arr2.push(el.value);

                    });

                    $('#channel').val(arr2.join("-"));
                } //回调
        });
    </script>
</body>
</html>